package com.tj.collection.enums;

/**
 * Author: pavan
 * Date: 2020/11/3 5:48 下午
 */
public enum ClActiveStatusEnum {
    TYPE1(1, 1, "1 Days"),
    TYPE2(2, 3, "3 Days"),
    TYPE3(3, 7, "7 Days"),
    TYPE4(4, 14, "14 Days"),
    TYPE5(5, 30, "30 Days"),
    ;

    private Integer type;

    private Integer days;

    private String desc;

    ClActiveStatusEnum(Integer type, Integer days, String desc) {
        this.type = type;
        this.days = days;
        this.desc = desc;
    }

    public Integer getType() {
        return type;
    }

    public  ClActiveStatusEnum setType(Integer type) {
        this.type = type;
        return this;
    }

    public Integer getDays() {
        return days;
    }

    public  ClActiveStatusEnum setDays(Integer days) {
        this.days = days;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public  ClActiveStatusEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static  ClActiveStatusEnum getEnum(Integer type) {
        for ( ClActiveStatusEnum e :  ClActiveStatusEnum.values()) {
            if (e.getType().equals(type)) {
                return e;
            }
        }
        return null;
    }
}
